package com.xbongbong.saas.service.impl;

import com.xbongbong.paas.pojo.dto.KeFuOnLineLogSaveDTO;
import com.xbongbong.paas.pojo.vo.KeFuOnLineLogSaveVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.entity.KeFuOnLineLogEntity;
import com.xbongbong.saas.model.KeFuOnLineLogModel;
import com.xbongbong.saas.service.KeFuOnLineLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @version v1.0
 * @auther: youli.chen
 * @date 2021/3/31 10:05 上午
 * @since v1.0
 */
@Service("keFuOnLineLogService")
public class KeFuOnLineLogServiceImpl implements KeFuOnLineLogService {

    @Resource
    private KeFuOnLineLogModel keFuOnLineLogModel;
    /**
     * 信息保存
     *
     * @param keFuOnLineLogSaveDTO
     * @return
     * @throws XbbException 创建时间 2019/4/16 9:56 AM
     *                      修改时间 2019/4/16 9:56 AM
     * @author youli.chen
     * @version v1.0
     * @since v1.0
     */
    @Override
    public KeFuOnLineLogSaveVO keFuOnLineLogSave(KeFuOnLineLogSaveDTO keFuOnLineLogSaveDTO) throws XbbException {
        KeFuOnLineLogSaveVO keFuOnLineLogSaveVO = new KeFuOnLineLogSaveVO();
        KeFuOnLineLogEntity entity = new KeFuOnLineLogEntity();
        entity.setCorpid(keFuOnLineLogSaveDTO.getCorpid());
        entity.setUserId(keFuOnLineLogSaveDTO.getUserId());
        keFuOnLineLogModel.save(entity);
        return keFuOnLineLogSaveVO;
    }
}
